package com.wtb.javatool.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.util.MimeType;

import java.util.Date;
@Data
@ToString
@ApiModel(value = "Resource",description="资源")
@NoArgsConstructor
@AllArgsConstructor
public class Resource {
    private static final long serialVersionUID = 5715043674151551828L;
    @ApiModelProperty(value = "资源ID")
    private Integer resourceId;
    @ApiModelProperty(value = "资源名称")
    private String resourceName;
    @ApiModelProperty(value = "学习人数")
    private Integer learnersCount;
    @ApiModelProperty(value = "资源大小（如'10MB'）")
    private String resourceSize;
    @ApiModelProperty(value = "资源状态(1:上架 0:下架)")
    private Integer resourceState;
    @ApiModelProperty(value = "点赞数量")
    private Integer likeCount;
    @ApiModelProperty(value = "上传时间")
    private Date uploadTime;
    @ApiModelProperty(value = "上传用户id")
    private Integer uploadUserId;
    @ApiModelProperty(value = "下载数量")
    private Integer downloadCount;
    @ApiModelProperty(value = "评分（如4.50）")
    private Double score;
    @ApiModelProperty(value = "所属课程ID")
    private Integer courseId;
    @ApiModelProperty(value = "所属资源类别ID")
    private Integer resourceTypeId;
    @ApiModelProperty(value = "用于存储上传的文件")
    private byte[] resourceData; // 新增：用于存储上传的文件
    @ApiModelProperty(value = "已评论人数")
    private Integer commentCount;
    @ApiModelProperty(value = "总评分")
    private Double totalScore;
    private String mimeType ;

    public Resource(Integer resourceId, String resourceName, Integer learnersCount, String resourceSize, Integer likeCount, Date uploadTime, Integer uploadUserId,
                    Integer downloadCount, Double score, Integer resourceTypeId
    ,Integer commentCount,Double totalScore) {
    }

}
